﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace AntMovement.Comm.Model
{
    public class VariableModel
    {
        public long Hash { get; set; }
        public object Source { get; set; }
        public PropertyInfo Property { get; set; }
        public string Label { get; set; }
        public bool IsClass { get; set; }
        public bool IsArray { get; set; }
        public int Index { get; set; }
        public string DataType { get; set; }

        public void SetValue(object value)
        {
            Property.SetValue(Source, value);
        }

        public object GetValue()
        {
            return Property.GetValue(Source);
        }
    }
}
